package com.esunny.resourcevisualization.controller;

import com.esunny.resourcevisualization.domain.response.ReturnStructure;
import com.esunny.resourcevisualization.service.RouterService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @version 1.0.0.0
 * @ClassName RouterController
 * @Description 路由控制接口
 * @Author baochencong
 * @Date 2020/10/11 19:11
 */
@Controller
@RequestMapping("/router")
public class RouterController {

    @Resource
    private RouterService routerService;

    /**
     * 获取路由信息
     *
     * @return 路由信息
     */
    @ResponseBody
    @GetMapping("/getAllRouter")
    public ReturnStructure getAllRouter() {
        return ReturnStructure.SUCCESS("获取路由信息成功", routerService.getAllRouter());
    }

}
